package com.itheima.web.interceptor;


import com.itheima.domain.db.Admin;

//ThreadLocal
public class AdminHolder{

    //搞一个线程池
    private static final ThreadLocal<Admin> adminTL =  new ThreadLocal<>();

    //set方法
    public static void set(Admin admin){
        adminTL.set(admin);
    }
    //get方法
    public static Admin get(){
        return adminTL.get();
    }
    //remove方法
    public static void remove(){
        adminTL.remove();
    }
}
